package com.crm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
@DynamicInsert
@DynamicUpdate
@Entity
@Table(name="netakers")
public class Netaskers {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Integer netAskerId;//网络咨询师id
private String netAskerName;//网络咨询师名称
private String checkState;//签到状态
private String changeState;//是否分配学生：是，否 
private String checkInTime;//签到时间
private Integer weight;//权重
private String roleName;//网络咨询师 默认 '网络咨询师'
@OneToOne(fetch=FetchType.EAGER)
@JoinColumn(name="userId")

private User us;//外键(用户id)
private Integer taskNum;//任务数量
public Netaskers() {
	super();
	// TODO Auto-generated constructor stub
}
public Netaskers(Integer netAskerId, String netAskerName, String checkState, String changeState, String checkInTime,
				 Integer weight, String roleName, User us, Integer taskNum) {
	super();
	this.netAskerId = netAskerId;
	this.netAskerName = netAskerName;
	this.checkState = checkState;
	this.changeState = changeState;
	this.checkInTime = checkInTime;
	this.weight = weight;
	this.roleName = roleName;
	this.us = us;
	this.taskNum = taskNum;
}
public Integer getNetAskerId() {
	return netAskerId;
}
public void setNetAskerId(Integer netAskerId) {
	this.netAskerId = netAskerId;
}
public String getNetAskerName() {
	return netAskerName;
}
public void setNetAskerName(String netAskerName) {
	this.netAskerName = netAskerName;
}
public String getCheckState() {
	return checkState;
}
public void setCheckState(String checkState) {
	this.checkState = checkState;
}
public String getChangeState() {
	return changeState;
}
public void setChangeState(String changeState) {
	this.changeState = changeState;
}
public String getCheckInTime() {
	return checkInTime;
}
public void setCheckInTime(String checkInTime) {
	this.checkInTime = checkInTime;
}
public Integer getWeight() {
	return weight;
}
public void setWeight(Integer weight) {
	this.weight = weight;
}
public String getRoleName() {
	return roleName;
}
public void setRoleName(String roleName) {
	this.roleName = roleName;
}
public User getUs() {
	return us;
}
public void setUs(User us) {
	this.us = us;
}
public Integer getTaskNum() {
	return taskNum;
}
public void setTaskNum(Integer taskNum) {
	this.taskNum = taskNum;
}
@Override
public String toString() {
	return "Netakers [netAskerId=" + netAskerId + ", netAskerName=" + netAskerName + ", checkState=" + checkState
			+ ", changeState=" + changeState + ", checkInTime=" + checkInTime + ", weight=" + weight + ", roleName="
			+ roleName + ", us=" + us + ", taskNum=" + taskNum + "]";
}

}
